Skip to content

XRAY-156682 - Yarn native support - #854

Open
Phavya-jfrog wants to merge 2 commits into
jfrog:devfrom
Phavya-jfrog:feature/XRAY-156682-yarn-native
Open

XRAY-156682 - Yarn native support#854
Phavya-jfrog wants to merge 2 commits into
jfrog:devfrom
Phavya-jfrog:feature/XRAY-156682-yarn-native

Conversation

@Phavya-jfrog

@Phavya-jfrog Phavya-jfrog commented Aug 19, 2026

Copy link
Copy Markdown
Contributor
  • The pull request is targeting the dev branch.
  • The code has been validated to compile successfully by running go vet ./....
  • The code has been formatted properly using go fmt ./....
  • All static analysis checks passed.
  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.
  • Updated the Contributing page / ReadMe page / CI Workflow files if needed.
  • All changes are detailed at the description. if not already covered at JFrog Documentation, new documentation have been added.

Add native repository resolution for yarn v2 and v3 in jf ca.

Yarn v2, v3 resolution priority:

  1. npmRegistryServer entry in .yarnrc.yml — the only source ("Set me up")
  2. Clear error if it doesn't resolve

Screenshots attached in https://jfrog-int.atlassian.net/browse/XRAY-156682?focusedCommentId=1210543

@Phavya-jfrog Phavya-jfrog added improvement Automatically generated release notes safe to test Approve running integration tests on a pull request labels Aug 19, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Aug 19, 2026
@Phavya-jfrog Phavya-jfrog added the safe to test Approve running integration tests on a pull request label Aug 24, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Aug 24, 2026
@Phavya-jfrog Phavya-jfrog added the safe to test Approve running integration tests on a pull request label Aug 24, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Aug 24, 2026
@Phavya-jfrog
Phavya-jfrog force-pushed the feature/XRAY-156682-yarn-native branch from 714045d to d0826aa Compare August 24, 2026 11:12
@Phavya-jfrog Phavya-jfrog added the safe to test Approve running integration tests on a pull request label Aug 24, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Aug 24, 2026
@Phavya-jfrog
Phavya-jfrog force-pushed the feature/XRAY-156682-yarn-native branch from c7db131 to 0974d68 Compare August 24, 2026 12:22
@Phavya-jfrog Phavya-jfrog added the safe to test Approve running integration tests on a pull request label Aug 24, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Aug 24, 2026
@Phavya-jfrog Phavya-jfrog added the safe to test Approve running integration tests on a pull request label Aug 24, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Aug 24, 2026
Comment thread sca/bom/buildinfo/technologies/yarn/yarn.go
@gauriy-tech

Copy link
Copy Markdown
Collaborator

[Re: sca/bom/buildinfo/technologies/yarn/yarn.go:298] curationNoLockfileError unconditionally frames any pre-lockfile install failure as "curation is blocking manifests, not just tarballs," even when installErr is unrelated (e.g. a plugin-install permission error). Since probeBlockedDirectDeps authenticates independently via params.ServerDetails, an unrelated failure here (including the fallback-auth gap above) would still report zero blocked packages while the top-level message blames curation — pointing engineers toward removing/waiving packages that curation never actually evaluated.

Consider branching on whether installErr actually carries a curation-block signal before choosing this wording, falling back to a neutral "install failed, see debug log" message otherwise.


Review generated by xray-pr-review

@gauriy-tech

Copy link
Copy Markdown
Collaborator

[Re: commands/curation/curationaudit.go:975] This log line still says "(V4 native mode)" — after this PR, .yarnrc.yml-native resolution applies to V2/V3 too, so the label is now inconsistent with the rest of this change (not introduced by this PR, but adjacent to it). Consider dropping the version-specific qualifier, e.g. "...treating project as yarn (native .yarnrc.yml mode)."


Review generated by xray-pr-review

@gauriy-tech

Copy link
Copy Markdown
Collaborator

Missing test coverage for the two behavioral changes flagged above:

  • No test exercises configureYarnResolutionServerAndRunInstall / runYarnResolveOnlyLockfile end-to-end with IsCurationCmd: true and a fallback-only credential (no token in .yarnrc.yml) to confirm the spawned yarn subprocess actually authenticates. yarn_test.go is untouched by this PR, and TestSetRepoFromYarnrcAcceptsMatchingHost (added here) only asserts setRepoFromYarnrc populates ca.PackageManagerConfig — it stops short of driving that credential through to the subprocess.
  • No test on curationNoLockfileError covers a non-curation-shaped installErr (e.g. a plugin-install permission error) to confirm the message doesn't misattribute the failure to curation policy.

Both are reproducible with a fake yarn executable/script standing in for the real binary — happy to share a sketch if useful.


Review generated by xray-pr-review

@Phavya-jfrog Phavya-jfrog added the safe to test Approve running integration tests on a pull request label Aug 26, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Aug 26, 2026
@Phavya-jfrog
Phavya-jfrog force-pushed the feature/XRAY-156682-yarn-native branch from 93a0277 to 0cdd200 Compare August 26, 2026 09:27
@Phavya-jfrog Phavya-jfrog added the safe to test Approve running integration tests on a pull request label Aug 26, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Aug 26, 2026
@Phavya-jfrog Phavya-jfrog added the safe to test Approve running integration tests on a pull request label Aug 26, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Aug 26, 2026
@Phavya-jfrog
Phavya-jfrog force-pushed the feature/XRAY-156682-yarn-native branch from 55ba48d to 2a65259 Compare August 26, 2026 10:47
@Phavya-jfrog Phavya-jfrog added the safe to test Approve running integration tests on a pull request label Aug 26, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Aug 26, 2026
@Phavya-jfrog
Phavya-jfrog force-pushed the feature/XRAY-156682-yarn-native branch from 2a65259 to c6df628 Compare August 27, 2026 04:32
@Phavya-jfrog Phavya-jfrog added the safe to test Approve running integration tests on a pull request label Aug 27, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Aug 27, 2026
@Phavya-jfrog Phavya-jfrog added the safe to test Approve running integration tests on a pull request label Aug 27, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Aug 27, 2026
@Phavya-jfrog
Phavya-jfrog force-pushed the feature/XRAY-156682-yarn-native branch from c6df628 to 2612808 Compare August 27, 2026 05:18
@Phavya-jfrog Phavya-jfrog added the safe to test Approve running integration tests on a pull request label Aug 27, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Aug 27, 2026
@Phavya-jfrog Phavya-jfrog added the safe to test Approve running integration tests on a pull request label Aug 27, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Automatically generated release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants